package cn.shutdown.demo.thread.suspend.lock03;

/**
 * 测试独占锁， Mythread2 在System.out.println时暂停，
 * 因为System.out.println 是同步的，静态方法用synchronize修饰会锁整个类
 * @author jiangwujie
 * @date 2021/8/8
 */
public class SuspendLockTest2 {

    public static void main(String[] args) throws InterruptedException {
        Mythread2 mythread2 = new Mythread2();
        mythread2.start();
        Thread.sleep(5000);
        mythread2.suspend();
        System.out.println("main end");
    }

}
